<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>学校管理系统</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
            display: flex;
            min-height: 100vh;
        }

        /* Header Styles */
        .header {
            background: #fff;
            padding: 0 20px;
            height: 60px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            width: 100%;
            box-shadow: 0 1px 4px rgba(0,21,41,0.08);
            position: fixed;
            top: 0;
            left: 180px;
            right: 0;
            z-index: 1000;
        }

        .header-left {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .menu-icon {
            font-size: 20px;
            cursor: pointer;
        }

        .user-info {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .user-avatar {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: #eee;
        }

        /* Sidebar Styles */
        .sidebar {
            width: 180px;
            background: #2b3844;
            color: #fff;
            height: 100vh;
            position: fixed;
            left: 0;
            top: 0;
        }

        .logo {
            height: 60px;
            padding: 0 20px;
            display: flex;
            align-items: center;
            border-bottom: 1px solid rgba(255,255,255,0.1);
        }

        .menu-item {
            padding: 12px 20px;
            cursor: pointer;
            transition: background 0.3s;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .menu-item:hover {
            background: #364861;
        }

        .menu-item.active {
            background: #263440;
            border-left: 4px solid #409eff;
        }

        .submenu {
            background: #1f2d3d;
            padding-left: 20px;
        }

        .submenu .menu-item {
            padding: 10px 20px;
        }

        .submenu .menu-item.active {
            color: #409eff;
        }

        /* Main Content Styles */
        .main-content {
            margin-left: 180px;
            padding: 80px 20px 20px;
            background: #f0f2f5;
            width: calc(100% - 180px);
        }

        .breadcrumb {
            margin-bottom: 20px;
            color: #666;
        }

        /* Steps Styles */
        .steps {
            display: flex;
            background: #f5f7fa;
            padding: 15px 0;
            margin-bottom: 20px;
            border-radius: 4px;
        }

        .step {
            flex: 1;
            text-align: center;
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        .step-number {
            width: 24px;
            height: 24px;
            border-radius: 50%;
            background: #ddd;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
        }

        .step.active .step-number {
            background: #409eff;
            color: #fff;
        }

        .step.active {
            color: #409eff;
            font-weight: 500;
        }

        /* Toolbar Styles */
        .toolbar {
            margin-bottom: 20px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .btn {
            padding: 8px 15px;
            border: 1px solid #dcdfe6;
            border-radius: 4px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 5px;
            background: #fff;
            font-size: 14px;
        }

        .btn-primary {
            color: #409eff;
            border-color: #409eff;
        }

        .search-box {
            margin-left: auto;
            position: relative;
        }

        .search-input {
            padding: 8px 30px 8px 12px;
            border: 1px solid #dcdfe6;
            border-radius: 4px;
            width: 240px;
            font-size: 14px;
        }

        .search-icon {
            position: absolute;
            right: 10px;
            top: 50%;
            transform: translateY(-50%);
            color: #999;
        }

        /* Selected Classes Styles */
        .selected-classes {
            background: #ecf5ff;
            border: 1px solid #d9ecff;
            padding: 12px;
            margin-bottom: 20px;
            border-radius: 4px;
            color: #606266;
            font-size: 14px;
        }

        /* Table Styles */
        .table-container {
            background: #fff;
            border-radius: 4px;
            margin-bottom: 20px;
        }

        table {
            width: 100%;
            border-collapse: collapse;
        }

        th, td {
            padding: 12px 8px;
            border: 1px solid #ebeef5;
            text-align: left;
            font-size: 14px;
        }

        th {
            background: #fafafa;
            font-weight: 500;
        }

        tr:hover {
            background: #fafafa;
        }

        .checkbox {
            width: 16px;
            height: 16px;
            margin: 0;
        }

        .delete-btn {
            color: #409eff;
            background: none;
            border: none;
            cursor: pointer;
            padding: 0;
        }

        /* Pagination Styles */
        .pagination {
            display: flex;
            justify-content: center;
            gap: 4px;
            margin-top: 20px;
        }

        .page-btn {
            padding: 6px 12px;
            border: 1px solid #dcdfe6;
            background: #fff;
            cursor: pointer;
            border-radius: 4px;
        }

        .page-btn.active {
            background: #409eff;
            color: #fff;
            border-color: #409eff;
        }

        .page-btn:hover:not(.active) {
            color: #409eff;
        }
    </style>
</head>
<body>
<!-- Sidebar -->
<div class="sidebar">
    <div class="logo">学校管理系统LOGO</div>
    <div class="menu-item"><i class="icon">⌂</i>首页</div>
    <div class="menu-item"><i class="icon">📄</i>教务管理</div>
    <div class="menu-item active"><i class="icon">📅</i>走班排课</div>
    <div class="submenu">
        <div class="menu-item active">选课设置</div>
        <div class="menu-item">智能分班</div>
        <div class="menu-item">走班排课</div>
    </div>
    <div class="menu-item"><i class="icon">⏰</i>考勤管理</div>
    <div class="menu-item"><i class="icon">📝</i>作业管理</div>
    <div class="menu-item"><i class="icon">💻</i>资源管理</div>
    <div class="menu-item"><i class="icon">⚙️</i>配置管理</div>
    <div class="menu-item"><i class="icon">⚙️</i>系统管理</div>
</div>

<!-- Header -->
<header class="header">
    <div class="header-left">
        <span class="menu-icon">☰</span>
        <span>学校管理系统</span>
    </div>
    <div class="user-info">
        <div class="user-avatar"></div>
        <span>Lisa</span>
        <span>▼</span>
    </div>
</header>

<!-- Main Content -->
<main class="main-content">
    <div class="breadcrumb">选课设置 / 创建选课</div>

    <!-- Steps -->
    <div class="steps">
        <div class="step active">
            <div class="step-number">1</div>
            <span>基本信息</span>
        </div>
        <div class="step">
            <div class="step-number">2</div>
            <span>选课学生</span>
        </div>
        <div class="step">
            <div class="step-number">3</div>
            <span>选课设置</span>
        </div>
    </div>

    <!-- Toolbar -->
    <div class="toolbar">
        <button class="btn btn-primary">
            <span>+</span>
            添加学生
        </button>
        <button class="btn">
            <span>-</span>
            批量删除
        </button>
        <button class="btn">
            <span>-</span>
            全部删除
        </button>
        <div class="search-box">
            <input type="text" class="search-input" placeholder="请输入姓名、学号检索学生">
            <span class="search-icon">🔍</span>
        </div>
    </div>

    <!-- Selected Classes -->
    <div class="selected-classes">
        已选择班级：高一一班、高一二班、高一三班、高一四班、高二一班、高三一班、高三六班、高三七班、高三八班、高三九班、高三十班、高三十一班、高三十二班
    </div>

    <!-- Table -->
    <div class="table-container">
        <table>
            <thead>
            <tr>
                <th><input type="checkbox" class="checkbox" id="selectAll"></th>
                <th>#</th>
                <th>姓名</th>
                <th>性别</th>
                <th>学号</th>
                <th>证件号码</th>
                <th>学校</th>
                <th>年级</th>
                <th>行政班级</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody id="studentTableBody">
            <!-- Table rows will be dynamically inserted here -->
            </tbody>
        </table>
    </div>

    <!-- Pagination -->
    <div class="pagination">
        <button class="page-btn">«</button>
        <button class="page-btn">1</button>
        <button class="page-btn active">2</button>
        <button class="page-btn">3</button>
        <button class="page-btn">4</button>
        <button class="page-btn">5</button>
        <button class="page-btn">»</button>
    </div>
</main>

<script>
    // Sample student data
    const students = [
        {
            id: 1,
            name: '李大勇',
            gender: '女',
            studentId: '202010123',
            idCard: '140802199809786478',
            school: '新学道测试学院',
            grade: '一年级',
            adminClass: '一班'
        },
        // ... Add more student data here
    ];

    // Function to render table rows
    function renderStudentTable() {
        const tbody = document.getElementById('studentTableBody');
        tbody.innerHTML = students.map((student, index) => `
                <tr>
                    <td><input type="checkbox" class="checkbox" ${index < 6 ? 'checked' : ''}></td>
                    <td>${student.id}</td>
                    <td>${student.name}</td>
                    <td>${student.gender}</td>
                    <td>${student.studentId}</td>
                    <td>${student.idCard}</td>
                    <td>${student.school}</td>
                    <td>${student.grade}</td>
                    <td>${student.adminClass}</td>
                    <td><button class="delete-btn">删除</button></td>
                </tr>
            `).join('');
    }

    // Select all checkbox functionality
    document.getElementById('selectAll').addEventListener('change', function(e) {
        const checkboxes = document.querySelectorAll('tbody .checkbox');
        checkboxes.forEach(checkbox => checkbox.checked = e.target.checked);
    });

    // Initialize the table
    renderStudentTable();
</script>
</body>
</html>